import request from '@/config/utils/request'
import { loadingParams, pageLoadingParams } from '@/basa/utils/public'

// 列表查询
export function getList(data) {
  return request({
    // url: "/apis/smp/smptransportconc/listSmpTransportConcChangePage",
    url: '/apis/smp/rent/rentListSmpPcConcChangePage',
    method: 'POST',
    data: { ...data, ...pageLoadingParams }
  })
}

// 协议框架的列表
export function listProtocolinfoPage(data) {
  return request({
    url: '/apis/smp/frameworkPlan/qryTransportSupplyProtocolInfo',
    method: 'POST',
    data
  })
}

// 采购计划的列表
export function listPurplanPage(data) {
  return request({
    url: '/apis/smp/frameworkPlan/listPurplanDetlPage',
    method: 'POST',
    data
  })
}

// 采购方案的列表
export function listPursckinfoPage(data) {
  return request({
    url: '/apis/smp/frameworkPlan/listPursckinfoPage',
    method: 'POST',
    data
  })
}

// 变更详情
export function getSmpPcConcChangeById(data) {
  return request({
    url: '/apis/smp/smptransportconc/getTransportChange',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}

// 编辑详情
export function getSmpPcConcById(data) {
  return request({
    url: '/apis/smp/smptransportconc/getSmpTransportConcById',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}

// 新增--运输变更
export function saveSmpContractCreation(data) {
  return request({
    url: '/apis/smp/smptransportconc/saveTransportChange',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}

// 编辑--运输变更
export function editSmpContractCreation(data) {
  return request({
    url: '/apis/smp/smptransportconc/editTransportChange',
    method: 'POST',
    data: { ...data, ...loadingParams }
  })
}

// 撤回--运输变更
export function revokeSmpPcConcChange(data) {
  return request({
    url: '/apis/smp/smptransportconc/revokeTransportChange',
    method: 'POST',
    data: { ...data, ...loadingParams, loadingMessage: '撤回中,请稍等...' }
  })
}

// 删除-运输变更
export function removeSmpPcConcChange(data) {
  return request({
    url: '/apis/smp/smptransportconc/removeTransportChange',
    method: 'POST',
    data: { ...data, ...loadingParams, loadingMessage: '删除中,请稍等...' }
  })
}

// 合同导出
export function changeExport(data) {
  return request({
    url: '/apis/smp/smptransportconc/changeExport',
    method: 'POST',
    data: { ...data, ...loadingParams, loadingMessage: '导出中,请稍等...' }
  })
}
